package cn.tedu.account.service;

import cn.tedu.account.mapper.AccountMapper;
import cn.tedu.account.tcc.AccountTccAction;
import com.sun.org.apache.bcel.internal.generic.I2F;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.math.BigDecimal;

@Service
public class AccountServiceImpl implements AccountService{
    /*
    idea试图帮你检查依赖注入是否正确
     */
    @Resource
    private AccountTccAction tcc;

    @Override
    public void decrease(Long userId, BigDecimal money) {
        tcc.prepare(null, userId, money);
    }

}
